The present invention relates to the field of software development, and more specifically, to a computer-implemented method, a system and a computer program product for logging.
In current work of software development, logs of programs are important for debugging and analyzing the programs. A “log” of a program herein means execution information recorded during execution of the program, and the recording of the execution information may be referred to as “logging”.
A program may have a plurality of points of execution, and execution information may be recorded for each of the points of execution. During debugging of the program, a developer or a tester might not want to obtain the execution information for all the points of execution. Currently, selectively obtaining execution information is mainly implemented based on level definition, in which logs may be categorized into different levels according to how serious the execution information contained in the log may be, and each logging is enabled or disabled by deciding logs of which level or levels the developer or the tester would like to obtain.